#pragma once

#include"RedBlackTree.h"

namespace zy
{
	template<class k>
	class set
	{
		struct SetKeyOfT
		{
			const k& operator()(const k& key)
			{
				return key;
			}
		};
	public:
		typedef typename RBTree<k, const k, SetKeyOfT>::Iterator iterator;
		typedef typename RBTree<k, const k, SetKeyOfT>::const_Iterator const_iterator;

		iterator begin()
		{
			return _t.begin();
		}
		iterator end()
		{
			return _t.end();
		} 

		const_iterator begin() const
		{
			return _t.begin();
		}
		const_iterator end() const
		{
			return _t.end();
		}

		pair<iterator, bool> Insert(const k& key)
		{
			return _t.Insert(key);
		}


	private:
		RBTree<k, const k, SetKeyOfT> _t;
	};
}